<template>
  <div id="app">
    <!--引入helloWord-->
    <!-- header-->
    <top />
    <!-- end header-->
    <div class="tab">
      <div class="tab-item">
        <router-link to="/goods">商品</router-link>
      </div>
      <div class="tab-item">
         <router-link to="/ratings">评价</router-link>
      </div>
      <div class="tab-item">
          <router-link to="/seller">商家</router-link>
      </div>
    </div>
    <!-- 路由出口 -->
    <!-- 路由匹配到的组件将渲染在这里 -->
    <router-view></router-view>
  </div>
</template>

<script type="text/ecmascript-6">
import top from '@/components/top/top';

export default {
  name: 'App',
  data() {
    return{
      seller:{}
    };
  },
  created() {
    // GET /someUrl
    this.$http.get('/api/seller').then(response => {
      // get body data
      //this.someData = response.body;
      response = response.body;

    }, response => {
      // error callback
      if(response.error === 0){
        this.seller = response.data;

      }

    });
  },
  components: {
    top,
  },
};
</script>

<style>
.tab {
  display: flex;
  width: 100%;
  height: 40px;
  line-height: 40px;
  border-bottom: 1px solid rgba(7,17,17,0.1);
}

.tab-item {
  flex: 1;
  text-align: center;
}
.tab-item >a{
  display: block;
  text-decoration: none;
  color:rgb(77,85,93);
}
.tab-item >a.active{
  color:rgb(240, 20,20);
}

</style>
